# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ssldump
pkgver=1.7
pkgrel=1
groups=('blackarch' 'blackarch-sniffer')
pkgdesc='An SSLv3/TLS network protocol analyzer.'
arch=('x86_64' 'aarch64')
url='http://www.rtfm.com/ssldump/'
license=('custom:unknown')
depends=('openssl' 'json-c' 'libnet' 'libpcap')
source=("https://github.com/adulau/ssldump/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('1836d8cc968f006f7c503c5537594e2e47d35a8cfbb4c4de0eb3154e7f20b60d965589b4cdf6adf46584c8b55300bc12e186ddfc9641b8039c2851bec463c461')

build() {
  cd "$pkgname-$pkgver"

  ./autogen.sh

  # Arch64 fixes.
  ./configure \
    --prefix=/usr \
    --build=i686-pc-linux-gnu \
    --host=i686-pc-linux-gnu \
    "--sbindir=$pkgdir/usr/bin"

  make
}

package() {
  cd "$pkgname-$pkgver"

  make prefix="$pkgdir/usr" install

  install -Dm 644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

